package com.yunhe.abnormal.domain.base;

import com.yunhe.common.relat.authority.Firm;
import com.yunhe.common.relat.authority.Station;
import com.yunhe.common.relat.authority.User;
import io.swagger.annotations.ApiModel;
import org.neo4j.ogm.annotation.GeneratedValue;
import org.neo4j.ogm.annotation.Id;
import org.neo4j.ogm.annotation.NodeEntity;
import org.neo4j.ogm.annotation.Relationship;

import java.util.List;

/**
 * 异常通知配置
 * @author liuronglei
 */
@ApiModel(value = "AlarmNotifyConfig", description = "异常通知配置")
@NodeEntity
public class AlarmNotifyConfig {
    @Id
    @GeneratedValue
    private Long id;
    /**
     * 类型
     * 0:单位；1:个人
     */
    private Integer type;
    /**
     * 状态
     * 0:关闭；1:打开
     */
    private Integer status;
    /**
     * 全部电站开关
     */
    private Boolean isAllStation;
    /**
     * 适用电站
     */
    @Relationship(type = "STATION_OF")
    private List<Station> stations;
    /**
     * 异常通知类型
     */
    @Relationship(type = "ALARM_NOTIFY_TYPE_OF")
    private AlarmNotifyType alarmNotifyType;
    /**
     * 异常级别
     */
    @Relationship(type = "ALARM_LEVEL_OF")
    private AlarmLevel alarmLevel;
    /**
     * 所属单位
     */
    @Relationship(type = "FIRM_OF")
    private Firm firm;
    /**
     * 所属个人
     */
    @Relationship(type = "USER_OF")
    private User user;
    /**
     * 关联的用户ID
     */
    private Long relatedUserId;
    /**
     * 关联的单位ID
     */
    private Long relatedFirmId;
    /**
     * 序号
     */
    private Long sn;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Boolean getIsAllStation() {
        return isAllStation == null ? false : isAllStation;
    }

    public void setIsAllStation(Boolean isAllStation) {
        this.isAllStation = isAllStation;
    }

    public List<Station> getStations() {
        return stations;
    }

    public void setStations(List<Station> stations) {
        this.stations = stations;
    }

    public AlarmNotifyType getAlarmNotifyType() {
        return alarmNotifyType;
    }

    public void setAlarmNotifyType(AlarmNotifyType alarmNotifyType) {
        this.alarmNotifyType = alarmNotifyType;
    }

    public AlarmLevel getAlarmLevel() {
        return alarmLevel;
    }

    public void setAlarmLevel(AlarmLevel alarmLevel) {
        this.alarmLevel = alarmLevel;
    }

    public Firm getFirm() {
        return firm;
    }

    public void setFirm(Firm firm) {
        this.firm = firm;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public Long getSn() {
        return sn;
    }

    public void setSn(Long sn) {
        this.sn = sn;
    }

    public Long getRelatedUserId() {
        return relatedUserId;
    }

    public void setRelatedUserId(Long relatedUserId) {
        this.relatedUserId = relatedUserId;
    }

    public Long getRelatedFirmId() {
        return relatedFirmId;
    }

    public void setRelatedFirmId(Long relatedFirmId) {
        this.relatedFirmId = relatedFirmId;
    }
}